package com.sdzee.test;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class UpdateUserID extends HttpServlet {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException{
		
		this.getServletContext().getRequestDispatcher( "/WEB-INF/UpdateUser.jsp" ).forward( request, response );
	}
	
	public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException {
		
		String login=request.getParameter("Login");		
		String nom=request.getParameter("Nom");		
		String prenom=request.getParameter("Prenom");
		//String adresse=request.getParameter("Adresse"); 
		String ville=request.getParameter("Ville"); 
		
		String user=login+"/"+nom+"/"+prenom+"/"+ville;
		
		MySQLAccessUSER dao= new MySQLAccessUSER();
		try {
			dao.insertDataBase(user);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}
}
	
